package com.wj.auth.infrastrcture.mapper;


import com.wj.auth.infrastrcture.entity.ClientEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ClientMapper{
//    @Select(" SELECT\n" +
//            "        client.CODE\n" +
//            "      FROM\n" +
//            "          auth_client client\n" +
//            "      INNER JOIN auth_client_service gcs ON gcs.client_id = client.id\n" +
//            "    WHERE\n" +
//            "        gcs.service_id = #{serviceId}")
//    @ResultType(String.class)
@Select("select * from auth_client")
    List<String> selectAllowedClient(String serviceId);

    @Select("select * from auth_client")
    List<ClientEntity> selectAuthorityServiceInfo(int clientId);
}